<!doctype html>
<html>
<head>
<meta charset="utf-8"/>
<title>{$head[title]}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta content="{$head[keywords]}" name="keywords" />
<meta content="{$head[description]}" name="description" />
<base href="{SITE_URL}" />
<link href="favicon.ico" rel="shortcut icon" />
<link href="skin/style.css" rel="stylesheet" type="text/css" />
<link rel="alternate" type="application/rss+xml" title="{$head[title]}" href="/rss.php?rssid={$catid}" />
<script language="JavaScript" src="misc/config.js"></script>
<script language="JavaScript" src="misc/jquery.min.js"></script>
<script language="JavaScript" src="misc/common.js"></script>
<script language="JavaScript" src="misc/validator.js"></script>
</head>
<body>

{template 'header.html'}

<div class="container">
	
    <div class="aside">
    	{template 'left.html','order'}
    </div>
    <div class="main"> 
      
       <p id="position"> <strong>当前位置：</strong><a href="">首页</a><a href="{$MODULE[member][url]}">会员中心</a><a href="{$M[url]}">订单</a>我的订单</p>
    <div class="clear"></div>
    <div class="clear"></div>
    
    <div class="head">{if isset($status)}{$statusname}{else}全部{/if}订单</div>
    <table cellpadding="0" cellspacing="1" class="table_list"> 
      <tr>
        <th>产品</th>
		<th width="50">数量</th>
		<th width="80">总金额</th>
        <th width="105">下单时间</th>
        <th width="70">状态</th>
		<th width="120">操作</th>
      </tr>
	  {if $data}
	  {loop $data $r}
      <tr>
        <td class="align_l"><a href="{$r[goodsurl]}" target="_blank">{$r[goodsname]}</a></td>
        <td>{$r[number]}{$r[unit]}</td>
        <td><b>{$r[amount]}元</b></td>
        <td style="color:gray">{date('Y-m-d H:i', $r[time])}</td>
		<td>
		{$r[statusname]}
		{if $r['status']==0}<br /><a href="{url("?module=$module&action=pay&orderid=$r[orderid]")}"><span style="color:red">立即付款</span></a>{elseif $r['status']==2}<br /><a href="{url("?module=$module&action=receive&orderid=$r[orderid]")}"><span style="color:red">确认收货</span></a>{/if}
		</td>
		<td class="align_c">
		<a href="{url("?action=view&orderid=$r[orderid]")}">查看</a> | <a href="{url("?module=$module&action=memo&orderid=$r[orderid]")}">备注</a> | {if $r[status] == 0}<a href="javascript:confirmurl('{url("?module=$module&action=cancel&orderid=$r[orderid]")}', '取消该订单')" title="取消订单">取消</a>{else}<font color="#cccccc">取消</font>{/if}
        </td>
      </tr>
      {/loop}
	  {else}
		<tr><td colspan="6">暂无记录</td></tr>
	  {/if}
    </table>
    <div id="pagination">{$pages}</div>
  </div>
</div>
    
     
{template 'footer.html'}